{extend name="../../admin/view/main"}

{block name="button"}
<!--{if auth("index")}-->
<button data-open='{:url("index")}' data-title="返回任务列表" class='layui-btn layui-btn-sm layui-btn-primary'>返回任务列表</button>
<!--{/if}-->
<!--{if auth("del_content")}-->
<button data-action='{:url("del_content")}' data-rule="id#{key}" data-csrf="{:systoken('del_content')}" data-confirm="确定要删除这些采集内容吗？" class='layui-btn layui-btn-sm layui-btn-primary'>删除采集内容</button>
<!--{/if}-->
{/block}

{block name="content"}
<div class="layui-tab layui-tab-card think-bg-white">
    <div class="layui-tab-content think-box-shadow">
        <table class="layui-table margin-top-10" lay-skin="line">
            {notempty name='list'}
            <thead>
            <tr>
                <th class='list-table-check-td think-checkbox'>
                    <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'/></label>
                </th>
                <th class='text-left nowrap' width="120px">文章标题</th>
                <th class='text-left nowrap' width="150px">文章原URL</th>
                <th class='text-left nowrap'>缩略图</th>
                <th class='text-left nowrap'>作者</th>
                <th class='text-left nowrap'>来源</th>
                <th class='text-left nowrap'>发布时间</th>
                <th>操作</th>
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr>
                <td class='list-table-check-td think-checkbox'>
                    <label><input class="list-check-box" value='{$vo.id}' type='checkbox'/></label>
                </td>
                <td class='text-left nowrap'>
                    {$vo.title}
                </td>
                <td class='text-left nowrap'>
                   {$vo.url}
                </td>
                <td class='text-left nowrap'>
                    {$vo.thumb}
                </td>
                <td class='text-left nowrap'>
                    {$vo.author}
                </td>
                <td class='text-left nowrap'>
                    {$vo.comefrom}
                </td>
                <td class='text-left nowrap'>
                    {$vo.time}
                </td>
                <td class='text-left nowrap'>
                    <!--{if auth("edit_content")}-->
                    <a class="layui-btn layui-btn-sm" data-title="编辑内容" data-open='{:url("edit_content")}?id={$vo.id}'>编 辑</a>
                    <!--{/if}-->
                    <!--{if auth("del_content")}-->
                    <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除此内容吗？" data-action="{:url('del_content')}" data-value="id#{$vo.id}" data-csrf="{:systoken('del_content')}">删 除</a>
                    <!--{/if}-->
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
        {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
    </div>
</div>
{/block}
